feat(updates): update modal, auto-download setting, changelog#2818
feat(updates): update modal, auto-download setting, changelog#2818charlesvien wants to merge 14 commits into
Conversation
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
|
React Doctor found 1 issue in 1 file · 1 warning. 1 warning
Reviewed by React Doctor for commit |
|
f934def to
3b3c512
Compare
f47c58b to
8ebb593
Compare
3b3c512 to
05dc196
Compare
8ebb593 to
f7ef353
Compare
05dc196 to
8456ef4
Compare
There was a problem hiding this comment.
This PR exceeds the automated review size ceiling (1402 lines, 30 files) and touches multiple areas including Electron updater behavior, platform interfaces, core store logic, and new UI modals. The scope is too large to review confidently without human oversight — request a team member review before re-requesting auto-approval.
8456ef4 to
6cdb962
Compare
97fb702 to
d07a09a
Compare
There was a problem hiding this comment.
Gates denied this PR for exceeding size limits (1552 lines, 32 files). The change touches Electron updater behavior, platform interfaces, core store logic, host-router wiring, and multiple new UI modals — too broad to auto-approve. A prior bot review also flagged it as requiring human oversight. Request a team member review before re-requesting.
6cdb962 to
ae7bae2
Compare
f2656c7 to
482f3bf
Compare
ae7bae2 to
96ed56f
Compare
482f3bf to
2edb0b3
Compare

Problem
The move to electron-updater gave us a new set of primitives that were previously unavailable to us: checking for an update without downloading it, byte-level download progress, an explicit download trigger, install-on-quit and release notes at check time. The old experience used none of them. Updates downloaded silently, and the only UI was a bottom-left banner with a "Restart" button that appeared once the download had already finished. There was no opt-in download, no release notes, no progress and no way to browse the changelog.
Changes
Three user-facing additions, built on those primitives:
updates.setAutoDownloadprocedure.GitHubReleasesService(in workspace-server, publicGET /repos/PostHog/code/releases, Zod-parsed and cached). The current version is marked, and the modal auto-shows once on the first launch after an update installs (tracked with a persistedlastSeenChangelogVersion).Plumbing:
IUpdatergainsdownload(),onDownloadProgress()andsetAutoDownload(), andonUpdateAvailablenow carries the release notes. The electron-updater adapter setsautoDownloadto false andautoInstallOnAppQuitto true and wires thedownload-progressevent.UpdatesServicegains an "available" state, download progress and the auto-download decision, and the status payload plus the renderer stores carry the new fields.Auto-update stays macOS and Windows only; the What's New changelog works on every platform.
Stacked on #2817.
How did you test this?
pnpm typecheck(22 of 22),pnpm lintandpnpm buildall pass.pnpm testpasses. New unit tests cover theUpdatesServicetransitions (available, then requestDownload, then downloading, then ready, plus the auto-download branch) with a fakedIUpdater, and theGitHubReleasesServicemapping, caching and error handling with a faked fetch.Automatic notifications